In a conventional reproduction machine, a document (image) is scanned so that light reflected from the document causes a latent image of electrical charges to form on a photoreceptor. This latent image is then developed with toner, and the toner is transferred to a recording medium to produce a copy of the scanned document. These systems are commonly referred to as light-lens or non-digital copying systems.
The quality of a light-lens reproduction machine is a function of how well the copy matches the original. As is well know, various factors can impact this quality. For example, the scanning station can impact the quality if the optical path of the scanning station is not properly aligned. Also, the development station can impact the quality if a photoreceptor is not properly cleaned.
With the advent of digital reproduction machines, the above copy process for making a copy has changed. In a digital process, a document or image is scanned by a digital scanner which converts the light reflected from the document into electrical charges representing the light intensity from predetermined areas (pixels) of the document. These charges, after suitable processing, are converted into image signals or pixels of image data to be used by the digital reproduction machine to recreate the scanned image.
The pixels of image data are processed by an image processing system which converts the pixels of image data into signals which can be utilized by a printing device to recreate the scanned image. This printing device may be either a xerographic printer, ink jet printer, thermal printer, or any other type of printing device which is capable of converting digital data into a mark on a recording medium.
As with the light-lens systems, the quality of a reproduction machine is still a function of how well the copy matches the original. However, in this digital environment, other factors can now contribute to or impact the quality of the reproduced image. For example, the scanner can impact the quality if the scanner is not properly calibrated. Also, the output (printing) device can impact the quality if a printhead is clogged or a photoreceptor is not properly cleaned. But, the aspect of the digital system which can have the greatest impact is the digital (image) processing of the image data because a digital machine must convert light to a digital signal and then convert the digital signal to a mark on a recording medium. In other words, the image processing system provides the transfer function between the light reflected from the document to the mark on the recording medium.
Quality can be measured in many different ways. One way is to look at the characteristics of the reproduced image. An example of such a characteristic for determining the quality of the reproduced image is the contrast of the image. The contrast of an imaged (copied) document is the most commonly used characteristic for measuring quality since contrast provides a good overall assessment of the image's quality.
In a digital reproduction machine, the image processing system can greatly impact the contrast of the image. Thus, to assure high quality at the output printing device, it is desirable to know the contrast of the image being scanned prior to the image processing stage because, with this knowledge, the image processing system can process the image data so that the reproduced image has the proper contrast. One way of obtaining this contrast information prior to digital image processing is for the digital reproduction machine to generate a grey level histogram, which gives an easy to read measure of the image contrast. The image or grey level histogram describes the statistical distribution of grey levels of an image in terms of the number of pixels at each grey level. In other words, the number of pixels within an image that are associated with a certain grey level.
A histogram can be represented graphically with intensity on the horizontal axis from 0 to 255, if an eight-bit per pixel sampling resolution is utilized, and the number of pixels on the vertical axis. Using this graphical representation, a histogram can illustrate whether an image is basically dark or light and high or low contrast. It is important to know that when an image is represented by histogram, all spatial information is lost. The histogram specifies the number of pixels of each grey level but gives no indication where these pixels are located in the image. In other words, very different images may have very similar histograms.
Conventionally, when creating a histogram of the scanned image, a digital reproduction system samples a document, collects intensity data from the document, and uses this information to determine the document's background value. In such conventional systems, the computed background value of the document represents the average intensity of the document.
Histograms of low contrast images appear as a large, broad distributions or "modes" of pixel intensities in the grey scale and other grey regions completely unoccupied. High contrast shows up as a bimodal histogram where two, tall, thin peaks exist at the outer intensity regions.
Enhancement of an image (to correct for image degradations such as under or over-exposure, poor lighting, etc.) can be achieved by modifying the histogram of an image. This "contrast enhancement", is often made up of a combination of two linear transformations known as histogram slide and histogram stretch. These operations, based on an image's contrast and dynamic range characteristics, redistribute the histogram so that contrast and dynamic range may be enhanced. The objective of contrast enhancement is to utilize the full dynamic range to reveal the intensity variations (details) within the image that may not be visible until after the transformation.
The histogram sliding operation is simply the addition or subtraction of a constant intensity level to all pixels in the image. Doing this to every pixel effectively slides the entire input image histogram to the right or left. The basic effect of histogram sliding is a lightening or darkening of the image. Since the resulting histogram is only shifted, the contrast of the output image will be identical to that of the input image.
The linear transformation or tone reproduction curve (TRC) map for a sliding operation will always be a 45 degree line (this is why the image contrast is maintained). For a slide of zero, the line would pass through the origin. For a positive slide (&gt;0), the line will pass through the vertical axis (output intensity). For a negative slide, the line will pass through horizontal axis (input intensity). A positive slide effectively lightens an image, while a negative slide darkens an image.
Histogram stretching is the multiplication of all pixels in the image by a constant value. For example, a histogram, with all the pixels residing in the lower half of the grey scale range, will spread out to occupy the entire grey scale range when multiplied by a constant of two (2). This stretching operation expands or reduces the contrast and dynamic range of an image. The TRC map will always be a straight line passing through the origin. For the case of a stretch of one (1), the line would be at a 45 degree angle. In general, contrast enhancement is carried out in conjunction with histogram sliding.
Typically, in a scanner, the histogram of an image is determined from a prescan. The minimum and maximum reflectance (or intensity) of the image area scanned, (R.sub.min and R.sub.max) respectively, are determined from this scan. The grey scale transformation of shifting and stretching the grey scale to occupy the entire dynamic range is simply a mapping function from the input grey scale into a transformed output grey scale. This is normally accomplished with a look-up table. The "classic" method of dynamic range modification effectively shifts the input grey scale by R.sub.min and then stretches the input dynamic range (R.sub.min to R.sub.max) to the available output dynamic range, given by equation (1): ##EQU1##
where P.sub.OLD is the original pixel value, (Z.sub.max -Z.sub.min) is the largest possible dynamic range for the system, R.sub.max is the image reflectance value such that the sum of the image area which contains reflectances above R.sub.max is less than a prescribed percentage of the total image area, and R.sub.min is the image reflectance value such that the sum of the image area which contains reflectances below R.sub.min is less than a prescribed percentage of the total image area. For example, the percentage can be around three percent. Defining R.sub.min and R.sub.max as we do, allows a greater "range" to stretch the rest of the grey levels. However, this definition of R.sub.max and R.sub.min instead of the absolute minimum and maximum reflectance values within an image will cause equation (1) to effectively compress the grey level ranges of P.sub.OLD &lt;R.sub.min and P.sub.old &gt;R.sub.max by saturating them. This is usually tolerable, though, because, since by definition, very few pixels have grey levels in these ranges, hence, little image information should be lost.
As an example for illustration, assume that R.sub.min is 63 and R.sub.max is 127. The first term in equation (1) will shift each pixel to the left by R.sub.min or 63 in this case. The maximum dynamic range available is Z.sub.max -Z.sub.min or 255. The actual dynamic range used is R.sub.max -R.sub.min or 127-63=64. Therefore, all pixels in the image will be shifted by 63 and multiplied by 4 (255/64=4) to fill the entire available dynamic range.
In "Techniques for Image Processing and Classification in Remote Sensing," by Robert A. Schowengerdt, Academic Press, 1983, it was contended that if the image histogram is asymmetric, it is impossible to simultaneously control the average grey level of the output image and the amount of saturation at the ends of the histogram with a simple linear transformation. The article suggests a two (or more) segment piecewise linear transformation, to make better use of the available grey level range. One would need to manually determine a series of linear steps designed to expand the individual intensity ranges in which the data fall to fill the available dynamic range. Thus, one could designate a series of R.sub.min and R.sub.max values and use equation (1), within each region. The automation of this process and defining the boundaries of these segments in the TRC map is the subject of the discussion below.